import request from '@/utils/request'
import defaultSettings from '@/settings'
import { praseStrEmpty } from '@/utils/ruoyi'

//业务退回审核查询
export const apiUrlConfigApprove = {
  queryUrl: `${defaultSettings.ctx.cnapsApp}/bsInformation/businessReturn/CcmsBusinessReturnApprove/search`,
}

//业务退回审核beps318查询
export const apibeps318UrlConfigApprove = {
  queryUrl: `${defaultSettings.ctx.cnapsApp}/bsInformation/businessReturn/CcmsBusinessReturnApprove/searchDetail`,
}

//业务退回审核beps319查询
export const apibeps319UrlConfigApprove = {
  queryUrl: `${defaultSettings.ctx.cnapsApp}/bsInformation/businessReturn/CcmsBusinessReturnApprove/searchDetail1`,
}


//业务退回查询明细申请查询
export const apiUrlConfigQuery318 = {
  queryUrl: `${defaultSettings.ctx.cnapsApp}/bsInformation/businessReturn/CcmsBusinessReturnQuery/searchDetail`,
}

//业务退回查询明细应答查询
export const apiUrlConfigQuery318rsp = {
  queryUrl: `${defaultSettings.ctx.cnapsApp}/bsInformation/businessReturn/CcmsBusinessReturnQuery/searchRspDetail`,
}


//业务退回查询
export const apiUrlConfigQuery = {
  queryUrl: `${defaultSettings.ctx.cnapsApp}/bsInformation/businessReturn/CcmsBusinessReturnQuery/search`,
}



// 业务退回审核明细
export function ccmsBusinessReturnApproveDeatil(data) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/bsInformation/businessReturn/CcmsBusinessReturnApprove/detail?id=${data.id}&pkgNo=${data.pkgNo}&sysCode=${data.sysCode}&backType=${data.backType}`,
    method: 'get'
  })
}

// 业务退回申请录入
export function formBusinessReturnApplyEntry(data) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/bsInformation/businessReturn/CcmsBusinessReturnEntry/save`,
    method: 'post',
    data:data
  })
}
// 业务退回申请查询原交易
export function formBusinessReturnApplyEntrySearchOrgTxn(data) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/bsInformation/businessReturn/CcmsBusinessReturnEntry/searchOrgTxn`,
    method: 'post',
    data:data
  })
}


// 业务退回审核通过
export function ccmsBusinessReturnResponseApproveApprvoe(data) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/bsInformation/businessReturn/CcmsBusinessReturnApprove/approve`,
    method: 'post',
    data:data
  })
}

// 业务退回审核拒绝
export function ccmsBusinessReturnResponseApproveReject(data) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/bsInformation/businessReturn/CcmsBusinessReturnApprove/reject`,
    method: 'post',
    data:data
  })
}


// 业务退回查询明细
export function ccmsBusinessReturnQueryDeatil(data) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/bsInformation/businessReturn/CcmsBusinessReturnQuery/detail?id=${data.id}&drct=${data.drct}&sysCode=${data.sysCode}&backType=${data.backType}`,
    method: 'get'
  })
}
